package com.aihna.mall.domain.bo;

import com.aihna.mall.domain.StoreProductCate;
import com.aihna.common.core.validate.AddGroup;
import com.aihna.common.core.validate.EditGroup;
import com.aihna.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 商品分类业务对象 vvl_store_product_cate
 *
 * @author Joseph.Chen
 * @date 2024-03-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = StoreProductCate.class, reverseConvertGenerate = false)
public class StoreProductCateBo extends BaseEntity {

    /**
     * 分类ID
     */
    @NotNull(message = "分类ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 父类ID
     */
    @NotNull(message = "父类ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long catePid;

    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 图片地址
     */
    @NotBlank(message = "图片地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String image;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 状态，0：有效/启用；1：无效
     */
    @NotNull(message = "状态，0：有效/启用；1：无效不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;


}
